"""
__author__ = 'berlinyoung'
@File   :main_page.py
@Date   :2021/10/7 10:10
-*- coding: utf-8 -*-
"""
from appium.webdriver.common.mobileby import MobileBy

from test_app.test_po5.page.base_page import BasePage



class MainPage(BasePage):
    addressList_element = (MobileBy.XPATH,"//*[@text='通讯录']")
    manageMemberList_element = (MobileBy.ID,"com.tencent.wework:id/iwm")

    def goto_addresslist(self):
        #click[通讯录]
        self.find_and_click(*self.addressList_element)
        # self.driver.find_element(MobileBy.XPATH,"//*[@text='通讯录']").click()
        from test_app.test_po5.page.addresslist_page import AddressListPage
        return AddressListPage(self.driver)

    def goto_managelist(self):
        self.find_and_click(*self.addressList_element)
        self.find_and_click(*self.manageMemberList_element)
        from test_app.test_po5.page.managelist_page import ManageListPage
        return ManageListPage(self.driver)